1. Field of the Invention
The present invention relates to a system and method for synchronizing node clocks in a wireless network. More particularly, the present invention relates to a system and method for calculating clock shift, clock drift and propagation delays between a selected reference node and a client node in a wireless network. The calculated shift, drift and propagation delay values are used for accurate clock synchronization between the reference node and the client node clocks, and for computing the distance between nodes.
2. Description of the Related Art
In recent years, a type of mobile communications network known as an “ad-hoc” network has been developed to address the needs of multiple mobile device communication beyond traditional infrastructure coverage. In this type of network, each user terminal (hereinafter “mobile node”) is capable of operating as a mobile repeater or mobile router for other mobile nodes within the network, thus eliminating the need for a fixed infrastructure of base stations. Accordingly, data packets being sent from a source mobile node to a destination mobile node are typically routed through a number of intermediate nodes before reaching a destination node.
More sophisticated ad-hoc networks are also being developed which, in addition to enabling mobile nodes to communicate with each other as in conventional ad-hoc networks, further enable the mobile nodes to access fixed networks and communicate with other types of user terminals, such as those on the public switched telephone network (PSTN) and the Internet. Details of these advanced types of ad-hoc networks are described in U.S. patent application Ser. No. 09/897,790 entitled “Ad Hoc Peer-to-Peer Mobile Radio Access System Interfaced to the PSTN and Cellular Networks”, filed on Jun. 29, 2001, in U.S. patent application Ser. No. 09/815,157 entitled “Time Division Protocol for an Ad-Hoc, Peer-to-Peer Radio Network Having Coordinating Channel Access to Shared Parallel Data Channels with Separate Reservation Channel”, filed on Mar. 22, 2001, and in U.S. patent application Ser. No. 09/815,164 entitled “Prioritized-Routing for an Ad-Hoc, Peer-to-Peer, Mobile Radio Access System”, filed on Mar. 22, 2001, the entire content of each application being incorporated herein by reference.
The purpose of such networks, either wired or wireless, is to transmit data from one node to another. In wireless networks, this information is transferred as a sequence of messages between nodes. However, before transmitting the data message that actually contains the information, some control messages, or “overhead information”, are exchanged between participants. This assures that during the data transfer, no other activity (i.e. transmission) takes place in the same channel, and that both correspondents are tuned on the same frequency, one correspondent ready to transmit and the other ready to receive. After the data transfer is completed, the recipient replies with a message confirming the quality of the received data. This allows the transmitter of the data to adjust the characteristics of the next data transfer or repeat the last transfer at different transmission characteristics if data has not been received correctly.
The amount of overhead information exchanged in these wireless networks can become very large and adversely affect network capacity, especially when data packets are small and transmissions frequent. The amount of overhead exchanges can be reduced substantially however, by implementing activity planning using time slotting techniques. Unfortunately, such planning methods require a degree of clock synchronization between mobile nodes in the network, which is difficult in systems with low quality clocks.
For infrequent transmissions or transmissions of very large packets of data, the overhead for preparing the transmission is not important. Overhead transmissions however, become a burden when transmitted data is presented in small packets and these packets are transmitted frequently. Voice data packets are a good example of small, frequent data packet transmissions. Voice packets typically have less than 128 bytes of data and are repeated about 30 times every second. The amount of overhead information associated with the data stream presented in small, frequent transmissions can be reduced using various methods of planning. These methods provide both parties with all the information needed for assuring that only one transmission happens in one frequency and each-correspondent is tuned to the same frequency, at the same time, without using such high levels of overhead transmissions.
One method for planning efficient data transfer is to divide the transmission time into Time Frames (TF), each Time Frame further divided into Time Slots (TS). Such divisions of time allow the planning of frequent transmissions at Time Frame levels. Since the TS utilization does not change from one TF to another, the overhead information is exchanged only once before starting the communication and remains active for the duration of the transmission, or until rerouting of the transmission is necessary. For implementing methods using TF and TS however, it is first necessary to synchronize the clocks of participating nodes.
Clock synchronization is often used to describe any method dealing with clock adjustments at one or more nodes in a wired or wireless network. These may include converting a local time base to match a remote time base using a conversion function, or merely receiving information concerning a remote time base for reference purposes. For example, timing information between nodes may be exchanged in order to determine a basic conversion function existing between each node. Such message exchanges are discussed in U.S. Pat. No. 6,157,957 entitled “Clock Synchronization System And Method Using A Continuous Conversion Function For A Communication Network” issued Dec. 5, 2000 to Jean-Marc Berthaud, the entire content of which is incorporated herein by reference. The method presented in the Berthaud Patent directs the collection and storage of multiple message exchanges into a History data register. The register may then be used for computing a conversion function for converting a local clock value to a master time base. However, the Berthaud Patent fails to consider the asymmetry of exchange delays resulting from network queues created by communication traffic. Furthermore, the extensive processing of the History data registers to produce conversion functions is limited in mobile node applications, which are typically controlled by low speed CPUs and often lack the capability to perform floating-point operations. Further methods for calculating time bases at other nodes without adjusting local time bases are presented in U.S. Pat. No. 5,402,394 entitled “Process For Generating A Common Time Base For A System With Distributed Computing Units” issued Mar. 28, 1995 to Klaus Turski, the entire content of which is incorporated herein by reference.
The actual message exchanges between nodes for synchronization are often dependent upon node network configuration. One configuration, a closed loop communication ring, may pass messages through each node of the ring until the message, and any associated data, is returned to the originating node within the ring. Such a method may satisfy requirements in ring networks, however in the simplest configuration where a ring network is comprised of only two nodes, the message exchange may become excessive. Additional details of synchronization exchanges in communication rings are presented in U.S. Pat. No. 5,907,685 entitled “System And Method For Synchronizing Clocks In Distributed Computer Nodes” issued May 25, 1999 to John R. Douceur, and in U.S. Pat. No. 5,386,542 entitled “System For Generating A Time Reference Value In The MAC Layer Of An ISO/OSI Communications Model Among A Plurality Of Nodes” issued Jan. 31, 1995 to Brann et al., the entire content of each is incorporated herein by reference.
Where exchanges are used to adjust the local clock to correspond with a remote clock, several message exchange variables must be considered, such as message propagation times. Furthermore, clock synchronization between mobile nodes in an ad-hoc wireless network encounters additional difficulties, including clock shift and clock drift. For example, consider nodes A and B in a wireless network. At any given time t, the clock registers on each node A and B, will show values tA and tb. The difference between the two values, tA−tB, is the “clock shift” between the two nodes. The clock shift value must be added as a correction to either clock to make each show the same value. From equation (1) below, ΔAB is shown to be the correction to be applied to the clock value at node A, and ΔBA is shown to be the correction to be applied to the clock value at node B.ΔAB=tB−tA=−ΔBA  (1)Where tB is the clock value at node B at time t, and tA is the clock value at node A at time t.
If no other clock adjustments are made, after some time, clock registers A and B will show values t′A and t′B where the clock shift for each may again be determined using equation (1).Δ′AB=t′B−t′A=−Δ′BAWhere t′B is the clock value at node B at time t′, and t′A is the clock value at node A at the same time t′.
It is not unusual to observe that ΔAB and Δ′AB are not the same. Variations between ΔAB and Δ′AB are due, in part, to the fact that both nodes A and B may have clocks driven by oscillators running at different frequencies. Specifically, each node measured the same time (t′−t) in different units. Frequency variations may result in a time period, as measured with one clock, to be longer or shorter then an identical period measured with the second clock (i.e. node A clock measured an identical period differently than node B clock). Furthermore, neither measurement may equal the actual duration of the standard value for the period (i.e. neither clock measured the period correctly).
Another difficulty encountered is “clock drift”. The variation in clock shift values from time t to time t′ is the clock drift of the clock, and may be determined using equation (2).
                                          δ            AB                    =                                                    Δ                AB                            -                              Δ                AB                ′                                                                    t                A                            -                              t                A                ′                                                    ⁢                                  ⁢                              δ            BA                    =                      -                                                            Δ                  AB                                -                                  Δ                  AB                  ′                                                                              t                  B                                -                                  t                  B                  ′                                                                                        (        2        )            Where ΔAB is the shift value between nodes A and B at time t, and Δ′AB is the shift value between nodes A and B at time t′. Variables tA and tB are the clock register values of nodes A and B at time t, respectively. Finally, variables t′A and t′B are the clock register values of nodes A and B at time t′, respectively.
The relations between clock drifts of equation (2) are shown in equation (3).
                                          δ            AB                    =                      -                                          δ                BA                                            1                +                                  δ                  BA                                                                    ⁢                                  ⁢                              δ            BA                    =                      -                                          δ                AB                                            1                +                                  δ                  AB                                                                                        (        3        )            As stated above, variations are due in part to the fact that both nodes A and B may have clocks driven by oscillators running at different frequencies. The frequency difference that causes the clock drift is usually measured in parts-per-million (ppm). The quartz crystal controlling the oscillator in certain system hardware circuit boards may have precision levels better than ±1 ppm, meaning that within a period of one second, the clock values on two circuit boards can drift (clock drift) by less than 2 μs, or 2 ms in about 17 minutes. Although such a clock drift appears to be large, oscillators controlled with quartz crystals typically maintain a constant frequency over relatively long periods of time, which causes the drift, regardless of magnitude, to remain almost constant. However, to some degree, slow variations of clock drift values may result from temperature changes or, on unshielded boards, surrounding capacitance effects.
Prior discussions of clock synchronization recognize the difficulties arising from frequency differences, or “skew”, between node clocks. One solution is the creation of a phase-correction term, processed by a loop filter to control the local clock, which functions as a voltage-controlled oscillator. However this solution is restricted to nodes implementing local clocks having exceptionally stable local oscillators and loop filters. Additional details of voltage-controlled oscillators in clock control are discussed in a paper presented by David L. Mills entitled “Internet Time Synchronization: The Network Time Protocol”, the entire content of which is incorporated herein by reference.
Given these difficulties in mobile node clock synchronization, a need exists for a system and method for fast clock synchronization and dynamic drift correction of node clocks and for maintaining synchronization over long periods of time.